﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="testingEntityDataSourceWhere.aspx.cs" Inherits="BSCMFF.Web.Pages.working.testingEntityDataSourceWhere" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div>
    
<telerik:RadComboBox ID="RadComboBox1" runat="server" 
            DataSourceID="EntityDataSourceDepartments" DataTextField="Name" 
            DataValueField="SBU_ID" AutoPostBack="true" LoadingMessage="Loading">
        </telerik:RadComboBox>
        <asp:EntityDataSource ID="EntityDataSourceDepartments" runat="server" 
            ConnectionString="name=BSCEntities" DefaultContainerName="BSCEntities" 
            EnableFlattening="False" EntitySetName="SBUs"  
            Select="it.[SBU_ID], it.[Name]">
        </asp:EntityDataSource>
        <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="EntityDataSource1">
<MasterTableView DataSourceID="EntityDataSource1">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>

<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>

<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>

<FilterMenu EnableImageSprites="False"></FilterMenu>

<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
        </telerik:RadGrid><asp:EntityDataSource ID="EntityDataSource1" runat="server" 
            ConnectionString="name=BSCEntities" DefaultContainerName="BSCEntities" 
            EnableFlattening="False" EntitySetName="Users" EntityTypeFilter="" Select="" 
            Where="it.SBU_FK == @sbu_ID">
            <WhereParameters>
                <asp:ControlParameter ControlID="RadComboBox1" DefaultValue="0" Name="sbu_ID" 
                    PropertyName="SelectedValue" DbType="Int32" />
            </WhereParameters>
        </asp:EntityDataSource>
    </div>
    </form>
</body>
</html>
